<template>
    <div>
      <h3>自定义hooks</h3>
      <p>当前数值是：{{num}},放大十倍{{num1}}</p>
      <button @click="addNum">点击+1</button>
      <br>
      <img v-for="(item,index) in list" :key='index'  :src="item" alt="">
      <br>
      <button @click="addImg">添加</button>
    </div>
  </template>
  
  <script setup>
  import useList from '@/hooks/useList';
  import useCount from '@/hooks/useCount';
  const {list,addImg} = useList()
  const {num,num1,addNum} = useCount()
  </script>
  <style scoped>
  img {
      width: 200px;
      height: 200px;
      margin-left: 15px;
  }
  </style>